home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 125 / Computer Shopper CD-ROM Issue 125 (1998-07)(Dennis Publishing).iso / Business / Dazzler / DAZZLER.Z / CVariableRect.class (.txt) < prev    next >
Encoding:
Java Class File  |  1997-11-26  |  906 b   |  28 lines

  1. import java.io.DataInputStream;
  2.  
  3. public class CVariableRect {
  4.    private CVarOrValue m_vvLeft = new CVarOrValue();
  5.    private CVarOrValue m_vvRight = new CVarOrValue();
  6.    private CVarOrValue m_vvTop = new CVarOrValue();
  7.    private CVarOrValue m_vvBottom = new CVarOrValue();
  8.  
  9.    void LoadFromFile(DataInputStream var1) {
  10.       this.m_vvLeft.LoadFromFile(var1);
  11.       this.m_vvTop.LoadFromFile(var1);
  12.       this.m_vvRight.LoadFromFile(var1);
  13.       this.m_vvBottom.LoadFromFile(var1);
  14.    }
  15.  
  16.    CRect GetRect() {
  17.       CRect var1 = new CRect(this.m_vvLeft.GetValue(), this.m_vvTop.GetValue(), this.m_vvRight.GetValue() - this.m_vvLeft.GetValue(), this.m_vvBottom.GetValue() - this.m_vvTop.GetValue());
  18.       return var1;
  19.    }
  20.  
  21.    void setToRectangle(CRect var1) {
  22.       this.m_vvLeft.SetValue(var1.x);
  23.       this.m_vvTop.SetValue(var1.y);
  24.       this.m_vvRight.SetValue(var1.x + var1.width);
  25.       this.m_vvBottom.SetValue(var1.y + var1.height);
  26.    }
  27. }
  28.